package cn.jit.util;

import java.util.Arrays;

public class UploadFileUtil {
	
	private static String [] VALID_FILE_SUFFIX = {".JPG",".jpg",".PNG",".png"};
	
	public static boolean fileSuffixIsAllowed(String suffix) {
		return Arrays.asList(VALID_FILE_SUFFIX).contains(suffix);
	}
	
	public static boolean fileSuffixIsAllowed(String[] arr, String targetValue) {
		return Arrays.asList(arr).contains(targetValue);
	}
}
